#pragma once
#include <boost/asio.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/beast.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/http.hpp>
#include <memory>
namespace net = boost::asio;
using tcp = net::ip::tcp;

class CServer : public std::enable_shared_from_this<CServer> {
public:
  CServer(boost::asio::io_context &ioc, unsigned short &port);
  void Start();

private:
  tcp::acceptor _acceptor;
  net::io_context &_ioc;
};